package com.zjun.controller;


import com.zjun.mapper.MainDataMapper;
import com.zjun.pojo.Result;
import com.zjun.service.impl.FrontendDataServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class FrontendDataController {

    @Autowired
    FrontendDataServiceImpl mainDataServiceImpl;

    // 查询每个大类支出了多少钱
    @GetMapping("/select")
    Result selectData() {
        HashMap<String,String> priceMap = mainDataServiceImpl.GetTotalPrice();
        return new Result(1, "success", priceMap);
    }


}
